#ifndef MLMAINWINDOW_H
#define MLMAINWINDOW_H

#include <QMainWindow>


#include <Phonon/VideoPlayer>
#include <Phonon/MediaSource>
#include <Phonon/VideoWidget>
#include <Phonon/MediaObject>
#include <Phonon/VolumeSlider>
#include <Phonon/SeekSlider>


class MLSettings;
class MLReader;
class MLPlayListViewer;

static const QString APP_NAME = "Med'Layer";
static const QString COMPANY_NAME = "Med'Layer";

namespace Ui {
    class MLMainWindow;
}

class MLMainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MLMainWindow(QWidget *parent = 0);
    ~MLMainWindow();

protected:
    bool eventFilter(QObject *obj, QEvent *pEvt);

protected slots:
    void closeEvent(QCloseEvent *evt);

    // Autoconected slots
    void on_actionPlay_triggered();
    void on_actionStop_triggered();

    void updateTick(qint64 time);


private slots:
    void showContextMenu(const QPoint&);
    void on_actionPrecedent_triggered();
    void on_action_triggered();
    void on_actionQuitter_triggered();
    void on_actionAboutQt_triggered();
    void on_actionShowPlaylist_triggered();
    void on_actionOpen_triggered();
    void on_actionShowPlayerAction_toggled(bool);

private:
    MLReader *_pReader;

    Ui::MLMainWindow *_pUi;

    MLPlayListViewer *_pPlaylistView;

    MLSettings *_pSettings;

    QStringList _playlist;

    Phonon::VideoPlayer *_pVideoPlayer;

    Phonon::VideoWidget *_pVideoWidget;

    Phonon::VolumeSlider *_pVolumeSlider;

    Phonon::SeekSlider *_pSeekSlider;
};

#endif // MLMAINWINDOW_H
